libxl: add libxl__random_bytes() which fills a buffer with random bytes
authorDavid Vrabel <david.vrabel@citrix.com>
Wed, 18 Jun 2014 16:12:51 +0000 (17:12 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 27 Jun 2014 13:13:21 +0000 (14:13 +0100)
commit6a2ba5cb7ec7a87a4c2b023f4f0ea61d19fc360a
tree32763829b6460f3c916fb8637527fd2376c1d1c9
parent0a9daad3802a4c4bb64076369ee43a90b390b351
libxl: add libxl__random_bytes() which fills a buffer with random bytes

The random bytes are obtained from /dev/urandom and are suitable for
almost all uses (except for generating long-lived secure keys).

Documentation suggests that /dev/urandom is widely available on Unix-like
systems (such FreeBSD and NetBSD).

A public libxl_random_bytes() (or similar) could be trivially added,
if this required in the future.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxl_internal.h
tools/libxl/libxl_utils.c